<template>
  <div id="homePage">
    <p>欢迎来到智逸人事</p>
    <div v-if="loginUser && loginUser.userRole === 'admin'">
    <!-- 管理员-->
    <AdminHomePage></AdminHomePage>
    </div>
    <!-- 用户 -->
    <div v-else>
    <UserHomePage></UserHomePage>
    </div>
  </div>

</template>

<script setup lang="ts">
import AdminHomePage from '@/Pages/AdminHomePage.vue'
import UserHomePage from '@/Pages/UserHomePage.vue'
import { useLoginUserStore } from '@/stores/useLoginUserStore.ts'
const loginUser=useLoginUserStore().loginUser;
console.log(loginUser)

</script>

<style scoped>
#homePage {
  margin-bottom: 16px;
}

#homePage .search-bar {
  max-width: 480px;
  margin: 0 auto 16px;
}

#homePage .tag-bar {
  margin-bottom: 16px;
}
</style>
